<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <meta http-equiv="Content-Type"
              content="text/html; charset=ISO-8859-1" />
        <title>File Upload Sample</title>
    </h:head>
    <body>
        <h:form id="myform" enctype="multipart/form-data">
            <h:outputStylesheet library="css" name="style.css" />
            <p:growl id="messages" showDetail="true" />
            <p:fileUpload
                fileUploadListener="#{fileuploadcontroller.uploadAttachment}"
                mode="advanced" update="messages" multiple="true"
                sizeLimit="900000000"
                allowTypes="/(\.|\/)(gif|jpe?g|png|txt)$/"
                uploadLabel="txtField" cancelLabel="Cancelar" label="Buscar archivo"
                required="true" />
            <br />
            <br />
            <strong>Mensaje</strong> <br/><br />
            <p:inputText id="txtField" style="width:250px" maxlength="40">
                <f:validateRequired for="txtField"></f:validateRequired>
            </p:inputText>
        </h:form>
    </body>
</html>